import { SearchDataList } from '@/api/search';
export default {
	// 开启命名空间
	namespaced: true,
	state: {
		dataListObj: {},
	},
	mutations: {
		dataObj(state, obj) {
			state.dataListObj = obj;
		},
	},
	actions: {
		async getDataList(context, params = {}) {
			let result = await SearchDataList(params);
			// console.log(result);
			if (result.data.code === 200) {
				context.commit('dataObj', result.data.data);
			}
		},
	},
};
